// 更新邮件地址
'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const res = await db.collection('users').where({open_id:event.openid}).update({email:event.email})
	return { code: 200, msg: event.email +  ' - 邮件提交成功'}
};
